/PROG  T2D_T1P
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "T2 DR -> T1 PK";
PROG_SIZE	= 2154;
CREATE		= DATE 12-07-19  TIME 13:21:08;
MODIFIED	= DATE 15-05-26  TIME 16:22:08;
FILE_NAME	= T2D_T1P;
VERSION		= 0;
LINE_COUNT	= 55;
MEMORY_SIZE	= 2566;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:   ;
   2:  LBL[10] ;
   3:  UFRAME_NUM=0 ;
   4:  UTOOL_NUM=1 ;
   5:  IF DI[14:ATC UNCHUCK OK]=ON OR DI[25:TOOL #1]=OFF,JMP LBL[90] ;
   6:  TIMER[10]=RESET ;
   7:  TIMER[10]=START ;
   8:   ;
   9:J P[2:CLEAR] 30% CNT50 ACC70    ;
  10:L P[4:APPROACH] 300mm/sec CNT50 ACC70    ;
  11:  WAIT DI[26:TOOL #2]=OFF    ;
  12:L P[5:APPROACH] 300mm/sec CNT50    ;
  13:L P[6:APPROACH] 300mm/sec FINE    ;
  14:L P[7:DROP] 100mm/sec FINE ACC50 DB    0.0mm,DO[21:TOOL2 POS]=ON    ;
  15:   ;
  16:  DO[21:TOOL2 POS]=ON ;
  17:  DO[13:REQ ATC CHUCK]=OFF ;
  18:  DO[14:REQ ATC UNCHUCK]=ON ;
  19:  WAIT DI[14:ATC UNCHUCK OK]=ON    ;
  20:  WAIT   1.00(sec) ;
  21:  DO[14:REQ ATC UNCHUCK]=OFF ;
  22:L P[8:APPROACH] 100mm/sec CNT50 ACC50 DB    0.0mm,DO[21:TOOL2 POS]=OFF    ;
  23:  WAIT DI[26:TOOL #2]=ON    ;
  24:L P[9:APPROACH] 300mm/sec CNT50    ;
  25:L P[10:APPROACH] 300mm/sec CNT50    ;
  26:L P[2:CLEAR] 200mm/sec CNT50 ACC70    ;
  27:J P[1:CLEAR] 30% CNT100    ;
  28:   ;
  29:J P[3:CLEAR] 30% CNT50    ;
  30:L P[11:APPROACH] 200mm/sec CNT50 ACC70    ;
  31:  WAIT DI[25:TOOL #1]=ON    ;
  32:L P[12:APPROACH] 300mm/sec CNT50    ;
  33:L P[13:APPROACH] 300mm/sec FINE    ;
  34:  DO[13:REQ ATC CHUCK]=OFF ;
  35:  DO[14:REQ ATC UNCHUCK]=ON ;
  36:  WAIT DI[14:ATC UNCHUCK OK]=ON    ;
  37:  WAIT    .50(sec) ;
  38:L P[14:PICK] 100mm/sec FINE ACC50 DB    0.0mm,DO[21:TOOL2 POS]=ON    ;
  39:  WAIT   1.00(sec) ;
  40:  DO[21:TOOL2 POS]=ON ;
  41:  DO[14:REQ ATC UNCHUCK]=OFF ;
  42:  DO[13:REQ ATC CHUCK]=ON ;
  43:  WAIT DI[13:ATC CHUCK OK]=ON    ;
  44:  WAIT   1.00(sec) ;
  45:L P[15:APPROACH] 100mm/sec FINE ACC50 DB    0.0mm,DO[21:TOOL2 POS]=OFF    ;
  46:L P[16:APPROACH] 300mm/sec CNT50    ;
  47:L P[11:APPROACH] 300mm/sec CNT50    ;
  48:L P[3:CLEAR] 200mm/sec CNT50 ACC70    ;
  49:  MOVE TO HOME    ;
  50:  TIMER[10]=STOP ;
  51:   ;
  52:  END ;
  53:   ;
  54:  LBL[90] ;
  55:  MESSAGE[ERROR: T2 DETECT OR NOT] ;
/POS
P[1:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2085.822  mm,	Y =     -.009  mm,	Z =  -527.271  mm,
	W =   180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3268.592  mm,	Y =  -784.192  mm,	Z =  -527.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =   -90.033 deg,
	E1=    14.706 deg
};
P[3:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3263.602  mm,	Y =   793.155  mm,	Z =  -527.000  mm,
	W =   180.000 deg,	P =     -.000 deg,	R =    90.253 deg,
	E1=    16.000 deg
};
P[4:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3232.821  mm,	Y =  -694.238  mm,	Z = -1209.221  mm,
	W =  -180.000 deg,	P =    89.668 deg,	R =   -90.000 deg,
	E1=    15.815 deg
};
P[5:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3245.195  mm,	Y =  -706.635  mm,	Z = -1341.439  mm,
	W =   178.944 deg,	P =    89.576 deg,	R =   -91.055 deg,
	E1=    15.815 deg
};
P[6:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3248.714  mm,	Y =  -488.167  mm,	Z = -1360.023  mm,
	W =   179.826 deg,	P =    87.882 deg,	R =   -90.343 deg,
	E1=    14.495 deg
};
P[7:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3248.712  mm,	Y =  -488.167  mm,	Z = -1440.743  mm,
	W =   179.823 deg,	P =    87.882 deg,	R =   -90.347 deg,
	E1=    14.495 deg
};
P[8:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3248.720  mm,	Y =  -661.288  mm,	Z = -1440.740  mm,
	W =   179.830 deg,	P =    87.882 deg,	R =   -90.340 deg,
	E1=    14.495 deg
};
P[9:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  3229.527  mm,	Y =  -702.585  mm,	Z = -1263.000  mm,
	W =   179.424 deg,	P =    89.576 deg,	R =   -90.577 deg,
	E1=    15.275 deg
};
P[10:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3226.814  mm,	Y =  -627.997  mm,	Z = -1042.927  mm,
	W =   179.357 deg,	P =    89.587 deg,	R =   -90.645 deg,
	E1=    15.815 deg
};
P[11:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3232.823  mm,	Y =   787.680  mm,	Z = -1045.378  mm,
	W =  -180.000 deg,	P =    89.668 deg,	R =    90.000 deg,
	E1=    15.815 deg
};
P[12:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.301  mm,	Y =   738.603  mm,	Z = -1283.466  mm,
	W =  -179.598 deg,	P =    89.667 deg,	R =    90.402 deg,
	E1=    15.815 deg
};
P[13:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3246.458  mm,	Y =   699.831  mm,	Z = -1445.077  mm,
	W =  -165.171 deg,	P =    88.285 deg,	R =   104.734 deg,
	E1=    14.516 deg
};
P[14:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3246.460  mm,	Y =   507.000  mm,	Z = -1445.076  mm,
	W =  -165.172 deg,	P =    88.285 deg,	R =   104.733 deg,
	E1=    14.516 deg
};
P[15:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3246.460  mm,	Y =   507.000  mm,	Z = -1370.998  mm,
	W =  -165.172 deg,	P =    88.285 deg,	R =   104.733 deg,
	E1=    14.516 deg
};
P[16:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3246.810  mm,	Y =   729.564  mm,	Z = -1372.606  mm,
	W =  -106.365 deg,	P =    89.530 deg,	R =   163.860 deg,
	E1=    15.816 deg
};
/END
